package com.fqy.gmall.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fqy.gmall.model.product.BaseAttrInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface BaseAttrInfoMapper extends BaseMapper<BaseAttrInfo> {
    //根据分类Id 获取平台属性数据

    /**
     * SELECT * FROM base_attr_info bai
     * INNER JOIN base_attr_value bav ON bai.id = bav.attr_id
     * WHERE category_id = 61 AND category_level = 3;
     * @param category1Id
     * @param category2Id
     * @param category3Id
     * @return
     */
    List<BaseAttrInfo> selectAttrInfoList(@Param("category1Id") Long category1Id,@Param("category2Id") Long category2Id,@Param("category3Id") Long category3Id);

    List<BaseAttrInfo> selectBaseAttrInfoList(Long skuId);

}
